export default {
	menu: 'activity', // aide
	icon: 'icon-task-add',
	label: '九宫格抽奖',
	//唯一 ID
	name: 'ActLotteryWheel',
	//组件可以配置的事件
	inline: false,
	style: false,
	dragBtn: true,
	rule() {
		//组件的渲染规则
		return {
			//组件的名称, 与上一步是对应
			type: 'ActLotteryWheel',
			props: {
				title: '九宫格抽奖',
				prizeList: null,
				goText: "抽奖",
				requiredPoints: 1,
				dailyLimit: 3,
				strategy: 'redistribute'
			}
		};
	},
	props() {
		return [{
				type: 'input',
				field: 'title',
				title: "标题（title）",
				value: "活动标题"
			},
			{
				type: 'input',
				field: 'goText',
				title: "开始文字（goText）",
				value: "抽奖"
			},
			{
				type: 'number',
				field: 'requiredPoints',
				title: "抽奖所需积分（requiredPoints）",
				value: 1,
				props: {
					min: 0
				},
				$required: true,
			},
			{
				type: 'number',
				field: 'dailyLimit',
				title: "每天抽奖次数上限（dailyLimit）",
				value: 3,
				props: {
					min: 0
				}
			},
			{
				type: 'radio',
				field: 'strategy',
				title: "库存耗尽处理策略（strategy）",
				value: 'redistribute',
				props: {
					size: 'default'
				},
				options: [{
						label: '按比例分配给其他奖品',
						value: 'redistribute'
					},
					{
						label: '转移给"谢谢参与"',
						value: 'to_default'
					},
				],
				$required: true,
			},
			{
				type: 'prizeList',
				field: 'prizeList',
				title: '奖品列表（prizeList）',
				value: [],
				props: {

				}
			}
		];
	}
};
